package xyz.showbooks.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import xyz.dfm.pojo.RightsPojo;
import xyz.dfm.util.UtilPagePojo;
import xyz.dfm.util.WebUtil;
import xyz.dfm.vo.PageResult;
import xyz.showbooks.mapper.RightsMapper;
import xyz.showbooks.service.RightsService;

import java.util.List;

/**
 * @author: Dsi
 * @date: 2022/2/21 11:12
 * @description:
 */
@Service
public class RightsServiceImpl implements RightsService {
    @Autowired
    private RightsMapper getRightsList;
    @Override
    public List getRightsList() {
        return getRightsList.getRightsList();
    }

    @Override
    public List<RightsPojo> findMenuByName(PageResult pageResult) {
        //处理pageResult
        UtilPagePojo utilPagePojo = WebUtil.utilPagePojo(pageResult);
        //获取数据库数据
        List<RightsPojo> rights= getRightsList.findMenuByName(utilPagePojo);
        return rights;
    }
}
